-
Notifications
You must be signed in to change notification settings - Fork 45
ExtraTokenBodyParameters, Fixes AB#3435741 #2825
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Conversation
|
❌ Work item link check failed. Description does not contain AB#{ID}. Click here to Learn more. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds support for extraTokenBodyParameters, enabling additional string/string parameter pairs to be included in OAuth2 token request bodies for both interactive and silent token acquisition flows.
- Creates a new interface
IHasExtraTokenBodyParametersto define the contract for classes carrying extra token body parameters - Implements the interface in
InteractiveTokenCommandParametersandBrokerSilentTokenCommandParametersclasses - Updates
MsalBrokerRequestAdapterto serialize these parameters and pass them toBrokerRequest - Extends the IPC schema in
BrokerRequestwith a newEXTRA_TOKEN_BODY_PARAMETERfield
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
IHasExtraTokenBodyParameters.java |
New interface defining the contract for retrieving extra token body parameters; contains a spelling error in documentation |
InteractiveTokenCommandParameters.java |
Implements IHasExtraTokenBodyParameters and adds extraTokenBodyParameters field; missing defensive copy getter |
BrokerSilentTokenCommandParameters.java |
Implements IHasExtraTokenBodyParameters and adds extraTokenBodyParameters field; missing defensive copy getter |
MsalBrokerRequestAdapter.java |
Updates both interactive and silent request methods to serialize and include extra token body parameters; contains code duplication and lacks test coverage |
BrokerRequest.java |
Adds new serialized field mExtraTokenBodyParameter to support IPC transmission of these parameters |
Summary
AB#3435741
The getToken request of the webapps API requires that pairs coming in the extraParameters field will need to be sent for interactive and silent requests. We'll need to send these parameters:
This PR addresses the second point by creating the extraTokenBodyParameter field, which will be parameters added to the body of the token requests.